package auth

import (
	"gindemo/controllers/auth"

	"github.com/gin-gonic/gin"
)

// 登录路由
func login(authGroup *gin.RouterGroup) {
	authGroup.POST("login", auth.LoginController)
}

// 注销路由
func logout(authGroup *gin.RouterGroup) {
	authGroup.POST("logout", auth.LogoutController)
}

// 接受路由传过来的分组
func RegisterSubRouters(g *gin.RouterGroup) {
	authGroup := g.Group("auth")
	login(authGroup)
	logout(authGroup)
}
